package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author stone
 * @date 2022/05/30 10:25
 */
@Controller
@RequestMapping("user")
public class UserController {

    //这三个映射路径都有共同的前缀user
    //窄化请求就是把Handler方法上的请求URL写短

    //@RequestMapping("user/login")
    @RequestMapping("login") //user/login
    @ResponseBody
    public String login() {
        return "login";
    }
    //@RequestMapping("user/logout")
    @RequestMapping("logout")
    @ResponseBody
    public String logout() {
        return "logout";
    }
    //@RequestMapping("user/modify")
    @RequestMapping("modify")
    @ResponseBody
    public String modify() {
        return "modify";
    }
}
